package xyz.thoughtset.viewer.apis.client.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import xyz.thoughtset.viewer.common.api.controller.BaseController;
import xyz.thoughtset.viewer.common.crud.api.controller.CrudController;
import xyz.thoughtset.viewer.modules.api.service.ApiInfoService;
import xyz.thoughtset.viewer.modules.step.service.BlockInfoService;
import xyz.thoughtset.viewer.modules.step.service.QueryBlockService;

import java.util.List;

@RestController
@RequestMapping
public class ApiController extends BaseController {
    @Autowired
    private ApiInfoService apiInfoService;


    @GetMapping(value = "/publishApi")
    public void publishApi(@RequestParam String apiId){
        apiInfoService.publishApi(apiId);
    }
    @GetMapping(value = "/unpublishedApi")
    public void unpublishedApi(@RequestParam String apiId){
        apiInfoService.unpublishedApi(apiId);
    }

}
